
mixin navItem(text, key, children, href="#")
    if navActive === key 
        li.layui-nav-item.layui-this&attributes(attributes)
                a(href=BASE_URL + href)=text
    else 
        li.layui-nav-item&attributes(attributes)
            a.nav-hook(href=href data-key=key)=text
            if children
                i.icon-arrow-down
                dl.sub-nav
                    each item in children
                        dd
                            a.nav-hook(href=BASE_URL + item.href || '#' data-key=item.key)=item.name


div.layui-container
    ul.layui-nav
        +navItem("首页", '')
        +navItem("买车", 'Jishou')
        +navItem("卖车", 'sellcar')
        +navItem("拍卖", 'paimai')
        +navItem("爱车养护", 'baoyang', [{name: '保养', key: 'baoyang'}, {name: '质保', key: 'weixiu'}])(class="has-new-icon")
        +navItem("估价", 'gujia')
        +navItem("帮看", 'jianding')
        +navItem("双创", 'sc', '', '/')
        +navItem("新闻", 'news')
        li.tel 
            span.icon-phone
            span='400-6161-677'